from flask_restful import fields
from libs.helper import TimestampField
from fields.robot.rob_func_fields import rob_func_fields
from fields.character_fields_def import base_character_fields
from fields.timbre_fields_def import base_timbre_fields
from fields.emoji_pack_fields_def import base_emoji_pack_fields
fun_domain_fields = {
    "id": fields.String,
    "tenant_id": fields.String,
    "name": fields.String,
    "descrip": fields.String,
    "default_character_id": fields.String,
    "default_timbre_id": fields.String,
    "default_emoji_pack_id": fields.String,
    "config": fields.Raw,
    "price":fields.Float(attribute="Price"),
    "funcs":fields.List(fields.Nested(rob_func_fields)),
    "characters":fields.List(fields.Nested(base_character_fields)),
    "timbres":fields.List(fields.Nested(base_timbre_fields)),
    "emoji_packs":fields.List(fields.Nested(base_emoji_pack_fields)),
    "created_at": TimestampField(),
    "updated_at": TimestampField(),
    "created_by": fields.String,
    "updated_by": fields.String,
}

fun_domain_list_fields = {
    "total": fields.Integer,
    "has_more": fields.Boolean,
    "data": fields.List(fields.Nested(fun_domain_fields)),
}